#include "camera.h"
#include <cstdio>

namespace tls{
  void* create_camera(std::FILE* file){
    real m[16];
    real fov;
    real sizex,sizey;
    int w,h;
    std::fscanf(file,"%lf%lf",&sizex,&sizey);
    for(int i=0;i<16;++i) std::fscanf(file,"%lf",m+i);
    std::fscanf(file,"%lf%d%d",&fov,&w,&h);
    return new camera(sizex,sizey,mat4x4(m),fov,w,h);
  }
}

